<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改信用管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-credit-edit" th:object="${wstCredit}">
            <input name="creditId" th:field="*{creditId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">编码：</label>
                <div class="col-sm-8">
                    <input name="code" th:field="*{code}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">分数：</label>
                <div class="col-sm-8">
                    <input name="descore" th:field="*{descore}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">信息：</label>
                <div class="col-sm-8">
                    <input name="info" th:field="*{info}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "wstudy/credit";
        $("#form-credit-edit").validate({
            focusCleanup: true,
            onkeyup:false,
            rules:{
                code:{
                    required:true,
                    number: true
                },
                descore:{
                    required:true,
                    number: true
                }
            },
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-credit-edit').serialize());
            }
        }
    </script>
</body>
</html>